<?php

namespace hiduoke\services\formBuilder\traits;

use hiduoke\services\formBuilder\DkAddonGroupSelect;
use hiduoke\services\formBuilder\DkAddonSelect;

/**
 * 应用相关
 * Trait DkAddonAuth
 * @package hiduoke\services\formBuilder\traits
 */
trait DkAddonAuth
{
    /**
     * 应用组应用选择器
     * @param $field
     * @param $title
     * @param string $value
     * @return DkAddonSelect
     */
    public static function dkAddonSelect($field, $title, $value = '')
    {
        $component = new DkAddonSelect($field, $title, $value);
        return $component;
    }

    /**
     * 应用组选择器
     * @param $field
     * @param $title
     * @param string $value
     * @return DkAddonGroupSelect
     */
    public static function dkAddonGroupSelect($field, $title, $value = '')
    {
        $component = new DkAddonGroupSelect($field, $title, $value);
        return $component;
    }
}